﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using VolunteerManager.ViewModel;

namespace VolunteerManager
{
	public partial class VoluteerPage
	{
		public VoluteerPage()
		{
			this.InitializeComponent();

			// 在此点之下插入创建对象所需的代码。
		}

        private void DataGrid_LoadingRow(object sender, System.Windows.Controls.DataGridRowEventArgs e)
        {
            e.Row.Header = e.Row.GetIndex() + 1;
        }

        private void DataGrid_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            if (e.OriginalSource is System.Windows.Controls.ScrollViewer)
            {
            }
            else
            {
                (this.DataContext as MainViewModel).EditCommand.Execute(null);
            }
        }
	}
}